import types from './type';

export default {
  // 获取下属医院列表
  [types.GET_HOSPITAL_LIST] (state, payload) {
    state.hospitalObj = payload;
  },
  // 获取医院信息详情
  [types.GET_HOSPITAL_DETAIL] (state, payload) {
    state.hospitalDetailObj = payload;
  },
  // 获取医院管理员列表
  [types.GET_HOSPITAL_MANAGER_LIST] (state, payload) {
    state.hospitalManagerObj = payload;
  },
  // 授权管理列表
  [types.GET_AUTH_MANAGE_LIST] (state, payload) {
    state.authManageObj = payload;
  },
  // 判断医院名称是否存在
  [types.GET_HOSPITAL_EXIST] (state, payload) {
    state.isExist = payload;
  },
  // 获取医院中药处方权限是否开放
  [types.GET_RECIPE_JURISDICTION] (state, payload) {
    state.isOpenPrescription = payload;
  },
  // 设置医院配置
  'SET_HOSPITAl_SETTING_CONFIG' (state, payload) {
    console.log(payload, '设置医院的数据');
    state.hospitalSettingConfig = payload;
  },
  // 是否开启erp
  [types.GET_IS_OPEN_ERP] (state, payload) {
    state.isOpenERP = payload;
  }

};
